package com.ysd.lis.controller.lab;


import com.ysd.common.Result;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.entity.lab.LabTatBaserule;
import com.ysd.lis.service.lab.LabTatBaseruleService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 * TAT监控基础规则 前端控制器
 * </p>
 *
 * @author cfz
 * @since 2024-10-25
 */
@RestController
@RequestMapping("/api/lab-tat-baserule")
public class LabTatBaseruleController extends BaseController {
    @Autowired
    LabTatBaseruleService labTatBaseruleService;

    @ApiOperation("查询")
    @GetMapping("/findLabTatBaseruleList")
    public Result findLabTatBaseruleList(LabTatBaserule labTatBaserule) {
        return labTatBaseruleService.findLabTatBaseruleList(labTatBaserule);
    }

    @ApiOperation("批量新增或修改")
    @PostMapping("/addOrUpdateBaserule")
    public Result addOrUpdateBaserule(@RequestBody List<LabTatBaserule> labTatBaserules) {
        return labTatBaseruleService.addOrUpdateBaserule(labTatBaserules);
    }
    @ApiOperation("增加")
    @PostMapping("/addLabTatBaserule")
    public Result addLabTatBaserule(@RequestBody LabTatBaserule labTatBaserules) {
        return labTatBaseruleService.addLabTatBaserule(labTatBaserules);
    }

    @ApiOperation("删除")
    @PostMapping("/deleteLabTatBaserule")
    public Result deleteLabTatBaserule(@RequestBody LabTatBaserule labTatBaserules) {
        return labTatBaseruleService.deleteLabTatBaserule(labTatBaserules);
    }

    @ApiOperation("修改")
    @PostMapping("/updateLabTatBaserule")
    public Result updateLabTatBaserule(@RequestBody LabTatBaserule labTatBaserule) {
        return labTatBaseruleService.updateLabTatBaserule(labTatBaserule);
    }
}
